<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>添加商品</title>

	<script type='text/javascript' src='http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/yc/hd_group_stu/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://localhost/yc/hd_group_stu/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://localhost/yc/hd_group_stu/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://localhost/yc/hd_group_stu/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
CONTROL = '<?php echo $GLOBALS['user']['CONTROL'];?>';
METH = '<?php echo $GLOBALS['user']['METH'];?>';
GROUP = '<?php echo $GLOBALS['user']['GROUP'];?>';
TPL = '<?php echo $GLOBALS['user']['TPL'];?>';
CONTROLTPL = '<?php echo $GLOBALS['user']['CONTROLTPL'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
HTTPREFERER = '<?php echo $GLOBALS['user']['HTTPREFERER'];?>';
</script>
	<link href='http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/bootstrap/css/bootstrap.min.css' rel='stylesheet' media='screen'>
<script src='http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/bootstrap/js/bootstrap.min.js'></script>
                <!--[if lte IE 6]>
                <link rel="stylesheet" type="text/css" href="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/bootstrap/ie6/css/bootstrap-ie6.css">
                <![endif]-->
                <!--[if lt IE 9]>
                <script src="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/bootstrap/js/html5shiv.min.js"></script>
                <script src="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/bootstrap/js/respond.min.js"></script>
                <![endif]-->
	<link type="text/css" rel="stylesheet" href="http://localhost/yc/hd_group_stu/./Hdgroup/Hdgroup/Admin/Tpl/Public/Css/public.css"/>
	<script type="text/javascript">

	$(function(){
		$('#start_time').calendar({format: 'yyyy/MM/dd HH:mm:ss'});
		$('#end_time').calendar({format: 'yyyy/MM/dd HH:mm:ss'});
	})
	</script>
</head>
<body>
<form action="" method="post"  class='hd-form'>

	

	<div class="wrap">
		<div class="title-header"><?php echo $shopname;?></div>
		<div class="menu_list">
			<ul>
				<li><a href="<?php echo U('Goods/index',array('shopid'=>$_GET['shopid']));?>"> 商品列表 </a></li>
				<li><a href="javascript:;" class="action"> 添加商品 </a></li>
				<li><a href="<?php echo U('shop/index');?>">商铺列表 </a></li>
			</ul>
		</div>
		<table class='table table-striped table-bordered '>
		<tbody>
			<tr>
				<td class="w100">商铺名称</td>
				<td>
					<select name="shopid" >
						<option value="0">请选择商铺</option>
						<?php if(is_array($shop)):?><?php  foreach($shop as $v){ ?>
							<option value="<?php echo $v['shopid'];?>" <?php if($v['shopid'] == $_GET['shopid']){?>selected='selected'<?php }?>><?php echo $v['shopname'];?></option>
						<?php }?><?php endif;?>
					</select>
				</td>
			</tr>

			<tr>
				<td class="w100">商品分类</td>
				<td>
					<select name="cid" >
						<option value="0">请选择商品分类</option>
						<?php if(is_array($category)):?><?php  foreach($category as $v){ ?>
							<option value="<?php echo $v['cid'];?>"><?php echo $v['_name'];?></option>
						<?php }?><?php endif;?>
					</select>
				</td>
			</tr>

			<tr>
				<td class="w100">地区</td>
				<td>
					<select name="lid" >
						<option value="0">请选择地区</option>
						<?php if(is_array($city)):?><?php  foreach($city as $v){ ?>
							<option value="<?php echo $v['lid'];?>"><?php echo $v['_name'];?></option>
						<?php }?><?php endif;?>
					</select>
				</td>
			</tr>

			<tr>
				<td class="w100">商品主标题</td>
				<td>
					<textarea name="main_title" class='w500 h100'></textarea>
				</td>
			</tr>

			<tr>
				<td class="w100">商品副标题</td>
				<td>
					<input type="text" name="sub_title"  class='w200' />
				</td>
			</tr>

			<tr>
				<td class="w100">现价</td>
				<td>
					<input type="text" name="price"  class='w200' />
				</td>
			</tr>
			<tr>
				<td class="w100">原价</td>
				<td>
					<input type="text" name="old_price"  class='w200' />
				</td>
			</tr>


			<tr>
				<td class="w100">图片</td>
				<td>
					<link rel="stylesheet" type="text/css" href="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Uploadify/uploadify.css" />
            <script type="text/javascript" src="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Uploadify/jquery.uploadify.min.js"></script>
            <script type="text/javascript">
            var HDPHP_CONTROL         = "http://localhost/yc/hd_group_stu/index.php?a=Admin&c=Goods&shopid=5&m=keditor_upload&g=Hdgroup";
            var UPLOADIFY_URL    = "http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Uploadify/";
            var HDPHP_UPLOAD_THUMB    ="460,280,200,100,310,185,90,55";
HDPHP_UPLOAD_TOTAL = 0</script>
            <script type="text/javascript" src="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Uploadify/hd_uploadify.js"></script>
<script type="text/javascript">
    $(function() {
        hd_uploadify_options.removeTimeout  =0;
        hd_uploadify_options.fileSizeLimit  ="2MB";
        hd_uploadify_options.fileTypeExts   ="*.jpg;*.png;*.gif";
        hd_uploadify_options.queueID        ="hd_uploadify_upload_queue";
        hd_uploadify_options.showalt        =true;
        hd_uploadify_options.uploadLimit    =1;
        hd_uploadify_options.input_type    ="input";
        hd_uploadify_options.elem_id    ="";
        hd_uploadify_options.upload_img_max_width    ="1000";
        hd_uploadify_options.upload_img_max_    ="1000";
        hd_uploadify_options.success_msg    ="正在上传...";//上传成功提示文字
        hd_uploadify_options.formData ={water : "1",upload_img_max_width:"1000",upload_img_max_height:"1000",fileSizeLimit:2097152, someOtherKey:1,PHPSESSID:"gdbstvf6gail0c78t78qrs1b17",upload_dir:"",hdphp_upload_thumb:"460,280,200,100,310,185,90,55"};
        hd_uploadify_options.thumb_width =200;
        hd_uploadify_options.thumb_height          =150;
        hd_uploadify_options.uploadsSuccessNums = 0;
        $("#hd_uploadify_upload").uploadify(hd_uploadify_options);
        });
</script>
<input type="file" name="up" id="hd_uploadify_upload"/>
<div class="hd_uploadify_upload_msg num_upload_msg" style="display:block">
<input type="checkbox" id="add_upload_water" uploadify_id="hd_uploadify_upload" checked='checked'/><strong style="color:#03565E">是否添加水印</strong><span></span>单文件最大<strong>2MB，允许上传类型*.jpg;*.png;*.gif</strong>
</div>

<div id="hd_uploadify_upload_queue"></div>
<div class="hd_uploadify_upload_files uploadify_upload_files" input_file_id ="hd_uploadify_upload">
    <ul></ul>
    <div style="clear:both;"></div>
</div>
				</td>
			</tr>

			<tr>
				<td>开始时间</td>
				<td><input readonly="readonly" name='start_time' type="text" id='start_time'></td>
			</tr>
			<tr>
				<td>结束时间</td>
				<td><input readonly="readonly" name='end_time' type="text" id='end_time'></td>
			</tr>

			<tr>
				<td class="w100">服务</td>
				<td>
					<?php if(is_array($goodsServer)):?><?php  foreach($goodsServer as $k=>$v){ ?>
					<label>
						<input type="checkbox" name="goods_server[]" value="<?php echo $k;?>" /><?php echo $v['name'];?>
					</label>
					<?php }?><?php endif;?>
				</td>
			</tr>

			<tr>
				<td class="w100">详细</td>
				<td>
					<script charset="utf-8" src="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Keditor/kindeditor-all-min.js"></script>
            <script charset="utf-8" src="http://localhost/yc/hd_group_stu/hdphp/hdphp/Extend/Org/Keditor/lang/zh_CN.js"></script>
        <textarea id="hd_detail" name="detail"></textarea>
        <script>
        var options_detail = {
        filterMode : false
                ,id : "editor_id"
        ,width : "100%"
        ,height:"300px"
                ,formatUploadUrl:false
        ,allowFileManager:false
        ,allowImageUpload:true
        ,afterBlur: function(){this.sync();}
        ,uploadJson : "http://localhost/yc/hd_group_stu/index.php?a=Admin&c=Goods&shopid=5&m=keditor_upload&g=Hdgroup&water=1&uploadsize=2000000&maximagewidth=false&maximageheight=false&PHPSESSID=gdbstvf6gail0c78t78qrs1b17"
        };var hd_detail;
        KindEditor.ready(function(K) {
                    hd_detail = KindEditor.create("#hd_detail",options_detail);
        });
        </script>
        		
				</td>
			</tr>
			
		</tbody>
	</table>
	</div>
	<div class='position-bottom'>
		<input type="submit" class='hd-success' value="添加" />

		
	</div>

	</form>
</body>
</html>